Fix dependency_manager: handle PEP 440 ~= compatible release syntax#776
Merged
vikrantpuppala merged 1 commit intomainfrom Apr 21, 2026
Merged
Conversation
The _extract_versions_from_specifier function stripped a single `~` character from constraint strings, which corrupted PEP 440 compatible release syntax (`~=`) by leaving a stray `=`. For example, `thrift = "~=0.22.0"` produced the invalid constraint `thrift>==0.22.0,<=0.23.0`, breaking every PR's "Unit Tests (min deps)" job since #733 was merged. Add an explicit branch for `~=` that strips both characters before extracting the minimum version. The Poetry-style single `~` branch is preserved for backward compatibility. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
samikshya-db
approved these changes
Apr 21, 2026
jprakash-db
approved these changes
Apr 21, 2026
madhav-db
approved these changes
Apr 21, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug in
scripts/dependency_manager.pywhere PEP 440 compatible release syntax (~=) was incorrectly handled, breaking every PR's "Unit Tests (min deps)" job.What broke
PR #733 ("Bump thrift to fix deprecation warning") changed
pyproject.toml:scripts/dependency_manager.py::_extract_versions_from_specifierhad a branch for Poetry-style~(single tilde) that strips one character. When applied to~=0.22.0, it left=0.22.0(with stray=). The downstream_create_flexible_minimum_constraintthen produced the invalid constraint:pip installrejects this withInvalidRequirement: Expected end or semicolon, failing every PR's min-deps install step.Fix
Add an explicit branch for
~=that strips both characters before extracting the minimum version. The Poetry-style single~branch is preserved for backward compatibility.How #733 got merged
PR #733 was merged with no CI checks reported on the branch — branch protection allowed the merge to bypass the unit test workflows that would have caught this. Worth investigating that separately.
Test plan
thrift>==0.22.0,<=0.23.0(invalid)thrift>=0.22.0,<0.23.0(valid)NO_CHANGELOG=true
This pull request was AI-assisted by Isaac.